/*
 Navicat Premium Data Transfer

 Source Server         : LocalHost
 Source Server Type    : SQL Server
 Source Server Version : 13005026
 Source Host           : localhost:1433
 Source Catalog        : streamboard
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 13005026
 File Encoding         : 65001

 Date: 13/04/2020 21:35:19
*/


-- ----------------------------
-- Table structure for Canvas
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Canvas]') AND type IN ('U'))
	DROP TABLE [dbo].[Canvas]
GO

CREATE TABLE [dbo].[Canvas] (
  [id] int  NOT NULL,
  [name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_date] datetime2(7)  NULL,
  [image] binary(255)  NULL,
  [owner] int  NULL
)
GO

ALTER TABLE [dbo].[Canvas] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of Canvas
-- ----------------------------
INSERT INTO [dbo].[Canvas]  VALUES (N'1', N'Test', N'2020-04-12 16:01:52.0000000', NULL, N'2')
GO


-- ----------------------------
-- Table structure for Users
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Users]') AND type IN ('U'))
	DROP TABLE [dbo].[Users]
GO

CREATE TABLE [dbo].[Users] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [username] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [password] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [email] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [nickname] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [mask] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[Users] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of Users
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Users] ON
GO

INSERT INTO [dbo].[Users] ([id], [username], [password], [email], [nickname], [mask]) VALUES (N'1', N'test', N'11ce6497386761167a0e475b808c4217', NULL, NULL, NULL)
GO

INSERT INTO [dbo].[Users] ([id], [username], [password], [email], [nickname], [mask]) VALUES (N'2', N'2018204542', N'11ce6497386761167a0e475b808c4217', NULL, N'Iceshadows', NULL)
GO

SET IDENTITY_INSERT [dbo].[Users] OFF
GO


-- ----------------------------
-- Primary Key structure for table Canvas
-- ----------------------------
ALTER TABLE [dbo].[Canvas] ADD CONSTRAINT [PK__Canvas__3213E83FA9A0D83D] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table Users
-- ----------------------------
ALTER TABLE [dbo].[Users] ADD CONSTRAINT [PK__User2__3213E83FAE44F739] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

